package ZZ_backup;
import java.io.*;
import java.sql.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import LawsonTransformJava.pgm.PR560Control;

public class CenterLightControl {

	public void run () {
		try {
			thread();
		} catch (IOException e) {
			// Could not write properties file
			// Could not create output file
			System.out.println("IOException: " + e);
		}
	}
	
	private void thread() throws IOException {

		Thread thread1, thread2, thread3, thread4, thread5 = null;
		
//		try {
//		//Allow Blank translations where appropriate
//		PR560Control pr560ctl_2011 = new PR560Control(new File("c:/PR560_2011.csv"), 2011, true);
////		pr560ctl_2011.setWhereCLause(" WHERE EMPLOYEE=404236");
//		thread1 = new Thread(pr560ctl_2011);
//		thread1.start();

		//Allow Blank translations where appropriate
		PR560Control pr560ctl_2012 = new PR560Control(new File("c:/PR560_2012.csv"), 2012, false);
		pr560ctl_2012.setWhereCLause(" WHERE PRTIME.EMPLOYEE BETWEEN 100015 AND 100300");
		thread2 = new Thread(pr560ctl_2012);
		thread2.start();
/*
		//Output EMPLOYEE records
			//Allow Blank translations where appropriate
			HR511 empDAO = new HR511(new File("c:/HR511.csv"), true);
			thread3 = new Thread(empDAO);
			thread3.start();

		//Output BENEFIT records
		//Allow Blank translations where appropriate
			BN531 benDAO = new BN531(new File("c:/BN531.csv"), false);
			thread4 = new Thread(benDAO);
			thread4.start();
		//Output HRDEPBEN records
		//Allow Blank translations where appropriate
			BN532 depBen = new BN532(new File("c:/BN532.csv"), false);
			thread5 = new Thread(depBen);
			thread5.start();
		} catch (SQLException e) {
			// Could not connect to the database
			System.out.println("SQLException: " + e);
			System.exit(1);
		}
*/
		
		//		try {
//		HR513 depDAO = new HR513(new File("c:/HR513.csv"));
//		thread3 = new Thread(depDAO);
//		thread3.start();
//		} catch (SQLException e) {
//			// Could not connect to the database
//			System.out.println("SQLException: " + e);
//			System.exit(1);
//		}
		
	}
}
